import { request } from '@/utils/request.js'

/**
 * 货箱申报信息 API JS
 */

export default {

  /**
   * 获取货箱申报信息分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'document/parcelDeclaration/index',
      method: 'get',
      params
    })
  },

  /**
   * 获取货箱申报信息列表无分页
   * @returns
   */
  getAllList (params = {}) {
    return request({
      url: 'document/parcelDeclaration/list',
      method: 'get',
      params
    })
  },

  /**
   * 添加货箱申报信息
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'document/parcelDeclaration/save',
      method: 'post',
      data
    })
  },

  /**
   * 更新货箱申报信息数据
   * @returns
   */
  update (id, data = {}) {
    return request({
      url: 'document/parcelDeclaration/update/' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取货箱申报信息
   * @returns
   */
  read (id) {
    return request({
      url: 'document/parcelDeclaration/read/' + id,
      method: 'get',
      data
    })
  },

  /**
   * 将货箱申报信息删除，有软删除则移动到回收站
   * @returns
   */
  deletes (data) {
    return request({
      url: 'document/parcelDeclaration/delete',
      method: 'delete',
      data
    })
  },

  /**
   * 从回收站获取货箱申报信息数据列表
   * @returns
   */
  getRecycleList (params = {}) {
    return request({
      url: 'document/parcelDeclaration/recycle',
      method: 'get',
      params
    })
  },

  /**
   * 恢复货箱申报信息数据
   * @returns
   */
  recoverys (data) {
    return request({
      url: 'document/parcelDeclaration/recovery',
      method: 'put',
      data
    })
  },

  /**
   * 真实删除货箱申报信息
   * @returns
   */
  realDeletes (data) {
    return request({
      url: 'document/parcelDeclaration/realDelete',
      method: 'delete',
      data
    })
  },

  /**
   * 更新申报信息
   * @returns
   */
  updateBatch (data) {
    return request({
      url: 'document/parcelDeclaration/updateBatch',
      method: 'put',
      data
    })
  },

    /**
    * 申报信息导入
    * @returns
    */
    importExcel (data = {}) {
      return request({
        url: 'document/parcelDeclaration/import',
        method: 'post',
        data
      })
    },

}